﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using System.Data.SqlClient;
using System.Diagnostics.Contracts;
using System.Configuration;

public partial class account_Editlogin : System.Web.UI.Page
{
    /// <summary> 获取被本页面操作的用户的名称。 </summary>
    public string UserName
    {
        get
        {
            if (string.IsNullOrEmpty(Request.QueryString["user"]))
                return User.Identity.Name;
            else
                return Request.QueryString["user"];
        }
    }


    protected void Page_Load(object sender, System.EventArgs e)
    {
        if (string.IsNullOrEmpty(Request.QueryString["user"]))//没有指定被修改的用户，那就是修改自己
        {
            selfPanel.Visible = true;
        }
        else
            otherPanel.Visible = true;


        ChangePassword.UserName = UserName;

    }

    protected void deleteAccountButton_Click(object sender, EventArgs e)
    {
        Membership.DeleteUser(User.Identity.Name);
    }
    protected void disableButton_Click(object sender, EventArgs e)
    {
        Membership.FindUsersByEmail(User.Identity.Name);

    }
    protected void enableButton_Click(object sender, EventArgs e)
    {

    }
}
